package com.rocky.project.model.family;

import java.util.Set;

import com.rocky.project.model.admin.Area;
import com.rocky.project.model.admin.User;

/**
 * 
 * @hibernate.joined-subclass  table = "t_family" dynamic-insert = "true" dynamic-update = "true" 
 * @hibernate.joined-subclass-key column="c_family_id"
 * 
 */
public class Family extends User {

	private static final long serialVersionUID = 8268198584779432891L;
	private String householdername;//户主姓名
	private String familycode;//家庭编码
	private String address;//家庭地址		
	private String personsJson;//家庭成员信息	
	
	private Person householder;//户主
	private Area area;//所在行政地区	
	private Set persons;//家庭成员
	private Set archives;//档案
	
	public String getPersonsJson() {
		return personsJson;
	}

	public void setPersonsJson(String personsJson) {
		this.personsJson = personsJson;
	}

	/**
	 * @hibernate.set lazy = "true" readonly = "false" cascade = "none" order-by="id desc" inverse = "true" 
	 * @hibernate.collection-key column = "c_family_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Archive"
	 */	
	public Set getArchives() {		
		return archives;
	}

	public void setArchives(Set archives) {
		this.archives = archives;
	}
	
	/**
	 * @hibernate.many-to-one 
	 * column = "c_houserholder_id" 
	 * cascade="none"	 
	 * not-null = "false" 
	 */
	public Person getHouseholder() {
		return householder;
	}

	public void setHouseholder(Person householder) {
		this.householder = householder;
	}
	/**
	 * @hibernate.set lazy = "true" readonly = "true" cascade = "none" order-by="c_person_id desc" inverse = "true" 
	 * @hibernate.collection-key column = "c_family_id"
	 * @hibernate.collection-one-to-many class="com.rocky.project.model.family.Person"
	 */	
	public Set getPersons() {
		return persons;
	}

	public void setPersons(Set persons) {
		this.persons = persons;
	}
	
	/**
	 * @hibernate.property column = "c_address" type = "string" 
	 */	
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	/**
	 * @hibernate.property column = "c_familycode" type = "string" 
	 */	
	public String getFamilycode() {
		return familycode;
	}

	public void setFamilycode(String familycode) {
		this.familycode = familycode;
	}
	/**
	 * @hibernate.property column = "c_householdername" type = "string" 
	 */	
	public String getHouseholdername() {
		return householdername;
	}

	public void setHouseholdername(String householdername) {
		this.householdername = householdername;
	}
	/**
	 * @hibernate.many-to-one 
	 * column = "c_area_id" 
	 * cascade="none"	 
	 * not-null = "false" 
	 */
	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}



	

}
